package com.baizhi.service.Impl;


import com.baizhi.dao.RecordDao;
import com.baizhi.entity.Record;
import com.baizhi.service.RecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class RecordServiceImpl implements RecordService {
    @Autowired
    private RecordDao rd;
    private List<Record> recordList;

    public RecordDao getRd() {
        return rd;
    }

    public void setRd(RecordDao rd) {
        this.rd = rd;
    }

    public List<Record> getRecordList() {
        return recordList;
    }

    public void setRecordList(List<Record> recordList) {
        this.recordList = recordList;
    }

    @Override
    public List<Record> selectRecordAndUser(int id) {
        return recordList=rd.selectRecordAndUser(id);
    }

    @Override
    public void add(Record record) {
        rd.add(record);
    }

}
